package com.google.chickens;

;

/**
 * @author Mucd
 * @Date 2020/12/7/007
 * @ClassName Test
 */
public class Test {
    public static void main(String[] args) {
        //执行 mat()方法
        mat();
    }

    public static void mat() {
       /* //攻击最多 25 只
        for (double i = 0; i <= 25; i++) {
            //母鸡最多 33 只
            for (double j = 0; j <= 33; j++) {
                //判断1: 三种鸡加起来最多不能超过100只🐓
                //判断2: 三种鸡价格加起来不能超过100块💴
                if (i * 4 + j * 3 + (100 - i - j) / 5 == 100 && (100 - i - j) % 5 == 0) {
                    System.out.println("公鸡" + i + "只，母鸡" + j + "只，小鸡" + (100 - i - j) + "只。");
                }
            }
        }
    }*/
        //小鸡最多200
        int xiaoji = 0;
        //公鸡最多25
        int muji = 0;
        //母鸡最多33
        int gongji = 0;
        //最多100只
        int zhi = 100;
        //最多100块钱
        int money = 100;
        for (xiaoji = 0;xiaoji<=zhi;xiaoji++){
            for (muji = 0;muji<=zhi;muji++){
                for (gongji = 0;gongji<=zhi;gongji++){
                    //判断1 三种鸡最多买100只
                    //判断2 三种鸡最花100元
                    if ((xiaoji+muji+gongji==zhi) && (muji*3+gongji*5+xiaoji*0.3 == money)){
                        System.out.println("母鸡:"+muji+",公鸡:"+gongji+",小鸡:"+xiaoji);
                    }
                }
            }
        }
    }
}
